#include "Implease.h"

int main() {
    HuffmanTree huffmanTree[TREE_SIZE];
    int weight[NODE_SIZE] = {7,5,2,4};
    createHuffmanTree(weight, huffmanTree);
//    printHuffmanTree(huffmanTree);
    HuffmanCode huffmanCode[NODE_SIZE];
    char temp[80] = "ABCD";
    encoding(temp, huffmanTree, huffmanCode);
    printHuffmanCode(huffmanCode);
    int ss[] = {1, 1, 1, 0};
    overlapDecoding(ss, sizeof(ss) / sizeof(int), huffmanTree, huffmanCode);
    int dd[] = {0, 1, 1, 1};
    overlapDecoding(dd, sizeof(ss) / sizeof(int), huffmanTree, huffmanCode);
//    char ggs[] = "010 001 10 10 111 110 111 011 10 000";
//    decoding(ggs, huffmanTree, huffmanCode);
}